package com.gopay.common.domain.dps;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * WaProductId entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "WA_PRODUCT")
public class WaProduct implements java.io.Serializable {

	// Fields

	private Integer id;
	private String productNo;
	private String productType;
	private String operator;
	private String rechargeProvince;
	private String useRange;
	private String productValue;
	private BigDecimal productAmt;
	private BigDecimal saleAmt;
	private BigDecimal costAmt;
	private String validityType;
	private String validityTime;
	private String suppliersNo;
	private String isShow;
	private Date validityStartTime;
	private Date validityEndTime;
	private Date createTime;
	private Date updateTime;
	private int version;
	//生效失效状态：已生效：1、已失效：0、待生效：2
	private String  validityStatus;
	//是否存在待生效数据：有：1、没有：2
	private String  haveBecomeValidity;

	//add by liuyu, 20170527, 视频会员卡-----start----->
	private String productName;//商品名称
	private String platformId;//平台ID 
	private String rechargeType; //充值类型：0-直充，1-卡密
	private String discountSwitch;//是否有优惠：0-否，1-是      
	private String discountType;//优惠类型：0-直接扣减金额，1-按比例扣减        
	private BigDecimal discountRate;//优惠幅度-优惠的具体金额或百分比       
	private BigDecimal discountedAmt;//优惠后的价格       
	private String discountImg;//优惠图片存储路径        
	private Date discountStartTs;//优惠开始时间   
	private Date discountEndTs; //优惠截止时间
	private String discountStatus;//优惠生效状态
	//add by liuyu, 20170527, 视频会员卡------end------>
	
	@Id
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "WA_PRODUCT_SEQ")
    @SequenceGenerator(name = "WA_PRODUCT_SEQ", allocationSize = 1, initialValue = 1, sequenceName = "WA_PRODUCT_SEQ")
	
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "PRODUCT_NO")
	public String getProductNo() {
		return this.productNo;
	}

	public void setProductNo(String productNo) {
		this.productNo = productNo;
	}

	@Column(name = "PRODUCT_TYPE" )
	public String getProductType() {
		return this.productType;
	}

	public void setProductType(String productType) {
		this.productType = productType;
	}

	@Column(name = "OPERATOR" )
	public String getOperator() {
		return this.operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	@Column(name = "RECHARGE_PROVINCE" )
	public String getRechargeProvince() {
		return this.rechargeProvince;
	}

	public void setRechargeProvince(String rechargeProvince) {
		this.rechargeProvince = rechargeProvince;
	}

	@Column(name = "USE_RANGE" )
	public String getUseRange() {
		return this.useRange;
	}

	public void setUseRange(String useRange) {
		this.useRange = useRange;
	}

	@Column(name = "PRODUCT_VALUE" )
	public String getProductValue() {
		return this.productValue;
	}

	public void setProductValue(String productValue) {
		this.productValue = productValue;
	}

	@Column(name = "PRODUCT_AMT")
	public BigDecimal getProductAmt() {
		return this.productAmt;
	}

	public void setProductAmt(BigDecimal productAmt) {
		this.productAmt = productAmt;
	}

	@Column(name = "SALE_AMT")
	public BigDecimal getSaleAmt() {
		return this.saleAmt;
	}

	public void setSaleAmt(BigDecimal saleAmt) {
		this.saleAmt = saleAmt;
	}

	@Column(name = "COST_AMT")
	public BigDecimal getCostAmt() {
		return this.costAmt;
	}

	public void setCostAmt(BigDecimal costAmt) {
		this.costAmt = costAmt;
	}

	@Column(name = "VALIDITY_TYPE")
	public String getValidityType() {
		return this.validityType;
	}

	public void setValidityType(String validityType) {
		this.validityType = validityType;
	}

	@Column(name = "VALIDITY_TIME")
	public String getValidityTime() {
		return this.validityTime;
	}

	public void setValidityTime(String validityTime) {
		this.validityTime = validityTime;
	}

	@Column(name = "SUPPLIERS_NO")
	public String getSuppliersNo() {
		return this.suppliersNo;
	}

	public void setSuppliersNo(String suppliersNo) {
		this.suppliersNo = suppliersNo;
	}

	@Column(name = "IS_SHOW")
	public String getIsShow() {
		return this.isShow;
	}

	public void setIsShow(String isShow) {
		this.isShow = isShow;
	}

	@Column(name = "VALIDITY_START_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getValidityStartTime() {
		return this.validityStartTime;
	}

	public void setValidityStartTime(Date validityStartTime) {
		this.validityStartTime = validityStartTime;
	}

	@Column(name = "VALIDITY_END_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getValidityEndTime() {
		return this.validityEndTime;
	}

	public void setValidityEndTime(Date validityEndTime) {
		this.validityEndTime = validityEndTime;
	}

	@Column(name = "CREATE_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "UPDATE_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "VERSION", nullable = false, precision = 22, scale = 0)
	public int getVersion() {
		return this.version;
	}

	public void setVersion(int version) {
		this.version = version;
	}
	
	@Column(name = "VALIDITY_STATUS")
	public String getValidityStatus() {
		return validityStatus;
	}

	public void setValidityStatus(String validityStatus) {
		this.validityStatus = validityStatus;
	}
	@Column(name = "HAVE_BECOME_VALIDITY")
	public String getHaveBecomeValidity() {
		return haveBecomeValidity;
	}

	public void setHaveBecomeValidity(String haveBecomeValidity) {
		this.haveBecomeValidity = haveBecomeValidity;
	}
	
	@Column(name = "PRODUCT_NAME")
	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}
	
	@Column(name = "PLATFORM_ID")
	public String getPlatformId() {
		return platformId;
	}

	public void setPlatformId(String platformId) {
		this.platformId = platformId;
	}
	
	@Column(name = "RECHARGE_TYPE")
	public String getRechargeType() {
		return rechargeType;
	}

	public void setRechargeType(String rechargeType) {
		this.rechargeType = rechargeType;
	}

	@Column(name = "DISCOUNT_SWITCH")
	public String getDiscountSwitch() {
		return discountSwitch;
	}

	public void setDiscountSwitch(String discountSwitch) {
		this.discountSwitch = discountSwitch;
	}

	@Column(name = "DISCOUNT_TYPE")
	public String getDiscountType() {
		return discountType;
	}

	public void setDiscountType(String discountType) {
		this.discountType = discountType;
	}

	@Column(name = "DISCOUNT_RATE")
	public BigDecimal getDiscountRate() {
		return discountRate;
	}

	public void setDiscountRate(BigDecimal discountRate) {
		this.discountRate = discountRate;
	}

	@Column(name = "DISCOUNTED_AMT")
	public BigDecimal getDiscountedAmt() {
		return discountedAmt;
	}

	public void setDiscountedAmt(BigDecimal discountedAmt) {
		this.discountedAmt = discountedAmt;
	}

	@Column(name = "DISCOUNT_IMG")
	public String getDiscountImg() {
		return discountImg;
	}

	public void setDiscountImg(String discountImg) {
		this.discountImg = discountImg;
	}

	@Column(name = "DISCOUNT_START_TS")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getDiscountStartTs() {
		return discountStartTs;
	}

	public void setDiscountStartTs(Date discountStartTs) {
		this.discountStartTs = discountStartTs;
	}

	@Column(name = "DISCOUNT_END_TS")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getDiscountEndTs() {
		return discountEndTs;
	}

	public void setDiscountEndTs(Date discountEndTs) {
		this.discountEndTs = discountEndTs;
	}

	@Column(name = "DISCOUNT_STATUS")
	public String getDiscountStatus() {
		return discountStatus;
	}

	public void setDiscountStatus(String discountStatus) {
		this.discountStatus = discountStatus;
	}

	public WaProduct(Integer id, String productNo, String productType, String operator, String rechargeProvince,
			String useRange, String productValue, BigDecimal productAmt, BigDecimal saleAmt, BigDecimal costAmt, String validityType,
			String validityTime, String suppliersNo, String isShow, Date validityStartTime, Date validityEndTime,
			Date createTime, Date updateTime, Integer version, String validityStatus, String haveBecomeValidity) {
		super();
		this.id = id;
		this.productNo = productNo;
		this.productType = productType;
		this.operator = operator;
		this.rechargeProvince = rechargeProvince;
		this.useRange = useRange;
		this.productValue = productValue;
		this.productAmt = productAmt;
		this.saleAmt = saleAmt;
		this.costAmt = costAmt;
		this.validityType = validityType;
		this.validityTime = validityTime;
		this.suppliersNo = suppliersNo;
		this.isShow = isShow;
		this.validityStartTime = validityStartTime;
		this.validityEndTime = validityEndTime;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.version = version;
		this.validityStatus = validityStatus;
		this.haveBecomeValidity = haveBecomeValidity;
	}

	@Override
	public String toString() {
		return "WaProduct [id=" + id + ", productNo=" + productNo + ", productType=" + productType + ", operator="
				+ operator + ", rechargeProvince=" + rechargeProvince + ", useRange=" + useRange + ", productValue="
				+ productValue + ", productAmt=" + productAmt + ", saleAmt=" + saleAmt + ", costAmt=" + costAmt
				+ ", validityType=" + validityType + ", validityTime=" + validityTime + ", suppliersNo=" + suppliersNo
				+ ", isShow=" + isShow + ", validityStartTime=" + validityStartTime + ", validityEndTime="
				+ validityEndTime + ", createTime=" + createTime + ", updateTime=" + updateTime + ", version=" + version
				+ ", validityStatus=" + validityStatus + ", haveBecomeValidity=" + haveBecomeValidity 
				+ ", productName=" + productName + ", platformId=" + platformId + ", rechargeType=" + rechargeType
				+ ", discountSwitch=" + discountSwitch + ", discountType=" + discountType 
				+ ", discountRate=" + discountRate + ", discountedAmt=" + discountedAmt 
				+ ", discountImg=" + discountImg + ", discountStartTs=" + discountStartTs 
				+ ", discountEndTs=" + discountEndTs + ", discountStatus=" + discountStatus + "]";
	}

	public WaProduct() {
		super();
		// TODO Auto-generated constructor stub
	}
	
}